
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.actionForm.ReaderForm" %>
<%@page import="com.actionForm.RechargeForm"%>
<%@ page import="com.dao.ReaderDAO" %>
<%@ page import="com.core.ChStr"%>
<%@ page import="java.util.*"%>
<html>
<%
Collection coll=(Collection)request.getAttribute("rechargeInfo");
%>
<head>
<title>消费记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="CSS/style.css">
</head>
<body onLoad="clockon(bgclock)">
<%@include file="banner.jsp"%>
<%@include file="navigation.jsp"%>
<body>
<%
ReaderForm readerForm=(ReaderForm)request.getAttribute("readerQueryif");

%>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td valign="top" bgcolor="#FFFFFF"><table width="99%" height="510"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray" style="border:1px #3692C5 solid;">
  <tr>
    <td height="510" valign="top" style="padding:5px;"><table width="98%" height="487"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="22" valign="top" class="word_orange">当前位置：读者管理 &gt; 读者档案管理 &gt;<a href="reader.do?action=readerQuery">消费记录</a>&gt;&gt;&gt;</td>
      </tr>
      <tr>
        <td align="center" valign="top"><%
if(coll==null || coll.isEmpty()){
%>
          <table width="100%" height="30"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="36" align="center">暂无消费记录！</td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
   
  </tr>
</table>
 <%
}else{
  //通过迭代方式显示数据
  Iterator it=coll.iterator();
 
  String time="";
  String money="";
  String balance="";
  
  %>
  
  <table width="95%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#ccc" bordercolordark="#F6B83B" bordercolorlight="#FFFFFF">
  <tr align="center" bgcolor="#add8e6">
    <td width="20%" bgcolor="#CAF1F8">时间</td>
    <td width="12%" bgcolor="#CAF1F8">充值消费情况</td>
    <td width="10%" bgcolor="#CAF1F8">余额</td>
  </tr>
<%
  while(it.hasNext()){
    RechargeForm rechargeForm=(RechargeForm)it.next();
	time=chStr.nullToString(rechargeForm.getChTime(),"&nbsp;");
	money=chStr.nullToString(rechargeForm.getMoeny(),"&nbsp;");
	balance=String.valueOf(rechargeForm.getBalance());
	%> 
  <tr>
    <td style="padding:5px;" align="center"><%=time%></td>  
    <td style="padding:5px;" align="center"><%=money%></td>
    <td align="center"><%=balance%></td>
  </tr>
<%
  }
}
%>

</table>

</td>
      </tr>
     
    </table>
    </td>
  </tr>
</table><%@ include file="copyright.jsp"%></td>
  </tr>
</table>
</body>
</html>
